/**
 * 
 */
package com.application.DataProvider;

import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

/**
 * @author TAI
 *
 */
public class JoinSubjectClassDAO {
	Context _mcontext = null;

	public JoinSubjectClassDAO(Context context){
		this._mcontext = context;
	}
	//Insert du lieu vao bang DetailLearning
	public int insertJoinSubjectClass(int idSub, int idClass) {
		int result = 0;
		DataProvider provider = new DataProvider(_mcontext);
		SQLiteDatabase db = provider.openDataBase();
		try {
			ContentValues values = new ContentValues();
			//int id = getIDMax();
			values.put("IDSubject", idSub);
			values.put("IDClass", idClass);

			result = provider.execInsertCommand(db, "JoinSubjectClass", values);
		} catch (Exception e) {
			// TODO: handle exception
		} finally {
			db.close();
		}

		return result;
	}
}
